using System.ComponentModel;

namespace AdminApiTemplate.Common.Models
{
    /// <summary>
    /// 分页请求
    /// </summary>
    public class PagedRequest
    {
        /// <summary>
        /// 页码（从1开始）
        /// </summary>
        public int? Page { get; set; } = 1;

        /// <summary>
        /// 每页显示数据数（默认20，设置为小于0的数表示不分页）
        /// </summary>
        public int? PageSize { get; set; } = 20;

        /// <summary>
        /// 是否倒序（默认倒序）
        /// </summary>
        public bool? OrderByDesc { get; set; } = true;

        /// <summary>
        /// 排序的字段
        /// </summary>
        public string? OrderByField { get; set; }

        /// <summary>
        /// 是否只获取总数
        /// </summary>
        public bool? OnlyTotalCount { get; set; }

        /// <summary>
        /// 是否只获取分页数据
        /// </summary>
        public bool? OnlyItems { get; set; }

        /// <summary>
        /// 是否导出
        /// </summary>
        public bool? Export { get; set; }

        /// <summary>
        /// 是否有导出的权限
        /// </summary>
        public bool? HasExportPermission { get; set; }

        /// <summary>
        /// 导出模块
        /// </summary>
        public string ExportModule { get; set; }

        /// <summary>
        /// 导出文件名
        /// </summary>
        public string ExportFileName { get; set; }
    }
}
